<?php

namespace app\api\controller\mox;

use app\common\controller\Api;
use app\admin\model\mox\Message as MessageModel;

/**
 * 消息提示
 */
class Message extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function list()
    {
        $model = new MessageModel();
        $list = $model->where('status', 'normal')->order('id desc')->select();
        $data = [];
        foreach ($list as $key => $value) {
            $data[] = $value['content'];
        }
        $this->success('请求成功', $data);
    }
}
